package PTA_03_09;

import java.util.Scanner;

public class s6 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        int flag = sc.nextInt();
        for (int i = 0; i < flag; i++) {
            int index = sc.nextInt();
            for (int j = index; j < n; j++) {
                arr[j-1] = arr[j];
            }
        }
        for (int i = 0; i < n - flag; i++) {
            System.out.printf("%d ",arr[i]);
        };
    }
}
